<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <?php include_once MvcReg::$_moduleName . '/views/layout/head.php'; ?>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.12.4/css/bootstrap-select.min.css">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.12.4/js/bootstrap-select.min.js"></script>
    <style>
        .bootstrap-select.form-control:not([class*="col-"]){
            width: 60%;
        }
    </style>
</head>
<body>
<?php include_once MvcReg::$_moduleName . '/views/layout/woody-prompt.php'; ?>
<?php include_once MvcReg::$_moduleName . '/views/layout/header.php'; ?>
<div id="main">
    <div class="container-fluid">
        <div class="row">
            <div class="col-md-2">
                <?php include_once MvcReg::$_moduleName . '/views/layout/left_menu.php'; ?>
            </div>
            <div class="col-md-10">
                <div class="right-content">
                    <h3>
                        <ol class="breadcrumb">
                            <li><a href="?md=manage&cl=statistics&at=companyRankingList"><i class="fa fa-dashboard"></i><?php echo $menu["breadcrumb_current"] ?></a></li>
                        </ol>
                    </h3>
                    <br>
                    <form name="mainform" action="" method="get">
                    <?php echo $hidden_data?>
                    <div class="table-responsive">
                        <div class="panel panel-default">
                            <div class="panel-body form-inline">
                                <div class="form-group">
                                    <label>下单时间:</label>
                                    <input type="text" name="STime" value="<?php echo $STime ?>" id="STime"  class="form-control input-sm date dstartDate" placeholder=""/> -
                                    <input type="text" name="ETime" value="<?php echo $ETime ?>" id="ETime"  class="form-control input-sm date dstartDate" placeholder=""/>
                                </div>
                                <button type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-search"></span>立即查询</button>
                                <div class="floatright">
                                    <div class="dataTables_filter">
                                        <a href="javascript:;" onclick="exp('<?php echo $STime ?>','<?php echo $ETime ?>')" class="btn btn-primary"><b>汇出</b></a>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <table class="table table-hover">
                            <thead>
                            <tr class="info">
                                <th>序</th>
                                <th>分司名称</th>
                                <th>分司代码</th>
                                <th>订单总量</th>
                                <th>配送费总额</th>
                            </tr>

                            </thead>
                            <tbody>
                            <?php
                            $n = 0;
                            if($rsp_list) {
                                foreach ($rsp_list as $k => $row) {
                                    $n++;
                                    $item = $n + ($page - 1) * $number_page;
                                    $id = $row["id"];
                                    ?>
                                    <tr data-id="<?php echo $id ?>">
                                        <td><?php echo $item ?></td>
                                        <td><?php echo $row['name'] ?></td>
                                        <td><?php echo $row['code'] ?></td>
                                        <td><?php echo $row['OrderNumber'] ?></td>
                                        <td><?php echo $row['ExpressFee'] ?></td>
                                    </tr>
                                <?php }
                            }?>
                            </tbody>
                        </table>
                        <div class="page">
                                <div class="pagination pull-left">共<?php echo $total_count ?>笔记录</div>
                                <?php if (!empty($rsp_page_list)) echo $rsp_page_list; ?>
                        </div>
                    </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<?php include_once MvcReg::$_moduleName . '/views/layout/footer.php'; ?>
<script>


    $("#STime").datetimepicker({
        language:  'zh-CN',
        format: "yyyy-mm-dd",
        autoclose: true,
        minView: "month",
        maxView: "decade",
        todayBtn: true,
        pickerPosition: "bottom-left",
        startDate:Date(),
    });

    $("#ETime").datetimepicker({
        language:  'zh-CN',
        format: "yyyy-mm-dd",
        autoclose: true,
        minView: "month",
        maxView: "decade",
        todayBtn: true,
        pickerPosition: "bottom-left",
        startDate:Date(),
    });
    function exp(STime,ETime) {
        window.location.href = "?md=manage&cl=statistics&at=export&stime="+STime+"&etime="+ETime;
    }
</script>
</body>
</html>
